<template>
  <div id="bottom-bar">
    <div class="info">
      <div>
        <i class="iconfont icon-kefu"></i>
        <span>客服</span>
      </div>
      <div>
        <i class="iconfont icon-dianpu1"></i>
        <span>店铺</span>
      </div>
      <div>
        <i class="iconfont icon-follow"></i>
        <span>收藏</span>
      </div>
    </div>
    <div class="add">
      <button @click="addToCart">加入购物车</button>
      <button>购买</button>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {}
  },
  methods: {
    addToCart() {
      this.$emit('addToCart')
    }
  }
}
</script>

<style lang="less" scoped>
#bottom-bar {
  position: relative;
  bottom: 5px;
  height: 50px;
  background-color: #fff;
  display: flex;
  z-index: 99;
  .info {
    flex: 50%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    div {
      display: flex;
      flex-direction: column;
      align-items: center;
      font-size: 14px;
      .iconfont {
        font-size: 20px;
      }
    }
  }
  .add {
    flex: 50%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: pink;
    button {
      border: none;
      width: 100%;
      height: 100%;
      font-size: 15px;
      outline: none;
    }
    :first-child {
      background-color: #ffe817;
    }
    :last-child {
      background-color: var(--color-a);
      color: #fff;
    }
  }
}
</style>
